class CreateTableItemReviews < ActiveRecord::Migration
  def self.up
    create_table :item_reviews do |t|
      t.integer   :user_id, :null => false
      t.integer   :item_id, :null => false
      t.text      :content
      t.varchar   :tags,    :limit => 1000
      t.varchar   :impression,  :limit => 1000
      t.integer   :up_total,  :default => 0
      t.integer   :down_total, :default => 0
      t.varchar   :ip, :limit => 20
      t.integer   :status, :limit => 1, :default => 0
      t.integer   :flag,  :limit => 4, :default => 0
    end
  end

  def self.down
    drop_table :item_reviews
  end
end
